package code.structure.module.configs.cmd
{
	import code.structure.module.configs.ConfigModel;
	import code.structure.module.configs.data.PerfumeConfigData;
	
	import flash.utils.Dictionary;

	/**
	 *解析香水屋配置数据 
	 * @author liangqian
	 * 
	 */	
	public class AnalysisPerfume
	{
		private var _dictionary:Dictionary;
		public function AnalysisPerfume(data:Object, config:ConfigModel)
		{
			_dictionary = new Dictionary();
			parserData(data, config);
		}
		
		private function parserData(data:Object, config:ConfigModel):void
		{
			var perfumeConfigData:PerfumeConfigData;
			for each (var i:Object in data) {
				perfumeConfigData = new PerfumeConfigData(i,config);
				_dictionary[perfumeConfigData.id] = perfumeConfigData;
			}
		}
		
		public function get dictionary():Dictionary
		{
			return _dictionary;
		}
	}
}